//
//  Utility.h
//  CarLifes
//
//  Created by yu on 2017/8/25.
//  Copyright © 2017年 jpas. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Utility : NSObject

+ (NSString *)turnDirection:(NSString *)dir;

// 时间字符串转时间戳
+ (NSDate *)stringToDateFromFormat:(NSString *)format timeStr:(NSString *)timeStr;

// 时间戳转时间字符串
+ (NSString *)dateToStringFromFormat:(NSString *)format withDate:(NSDate *)date;

/**
 返回方向

 @param angle 传入的角度
 @return 返回方向
 */
+ (NSString *)directionFromAngle:(CGFloat)angle;

+ (NSAttributedString *)attributeStringWithContent:(NSString *)content keyword:(NSString *)keyword;
//+ (NSAttributedString *)attributeStringWithContent:(NSString *)content keyWords:(NSArray *)keyWords;

+ (UIImage *)waterImage:(UIImage *)img text:(NSString *)text font:(CGFloat)font frame:(CGRect)frame location:(NSString *)location;

@end
